<?php

class Config {
    public static $config;
    
    public static function get ($name, $key = null) {
        if (! empty($key)) {
            if (!isset(self::$config[$name][$key])) {
                throw new Exception('key not exist');
            }
            return self::$config[$name][$key];
        } else {
            return self::$config[$name];
        }
    
    }
}
?>